<html>
<head>
<meta charset="UTF-8">
<title>手机上写写js</title>
</head>
<body>
<script type="text/javascript" src="../libs/minicomps.min.js"></script>
<script>
const {Panel,PlayButton,Label,TextInput,Canvas,Button,VSlider,VBox,NumericStepper,HSlider,RadioButton,Toggle,TipsManager,TextArea,Stage} = mc;

let win2=document.body;
let [x,y]=[0,20];
let [w,h,t1,t2]=[Stage.width,Stage.height/10,2,8];
let txtOut=new TextArea(win2,x,y).setSize(w,h*t1);
let txtInput=new TextArea(win2,x,h*t1).setSize(w,h*t2);
new Button(win2,0,0,'运行',(e)=>{
	eval(txtInput.text);
}).setSize(50);
new Button(win2,50,0,'清空',(e)=>{
	txtOut.text=''
}).setSize(50);
new Label(win2,104,4,'下面写代码，上面显示结果');
function log(...arg){
	arg.forEach((a)=>{
		txtOut.text+=a+'\n'
	})
}
</script>
</body>
</html>